package com.wdf.swagger.controller;

import com.wdf.swagger.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author wdf
 * @create 2019-05-15 16:31
 **/
@RestController
@RequestMapping(value = "/user")
@Api(tags = "user")
public class UserController {

    @ApiOperation(value = "根据Id获取歌手信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "用户ID", required = true, paramType = "query", dataType = "Long"),
    })
    @RequestMapping(value = "/getUserById",method = RequestMethod.GET)
    public User getUserById(@RequestParam(name = "id", required = false) Long id){
        return new User(1L,"王东");
    }
}
